netfilter: nf_tables: fix GC transaction races with netns and netlink event exit...
authorSasha Levin <sashal@kernel.org>
Fri, 22 Sep 2023 16:30:19 +0000 (18:30 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Sep 2023 04:15:31 +0000 (05:15 +0100)
commit940e758ba7d277bce8e04bf2ad76be6645e9e9f7
tree0e741694ed951ead0c53f6009d3032561c05c49b
parent6d39d87bf5654666bd9f479b74912e879b394098
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path

commit 6a33d8b73dfac0a41f3877894b38082bd0c9a5bc upstream.

Netlink event path is missing a synchronization point with GC
transactions. Add GC sequence number update to netns release path and
netlink event path, any GC transaction losing race will be discarded.

Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nf_tables-fix-gc-transaction-races-with-ne.patch
net/netfilter/nf_tables_api.c